
//
//  NewsScrollViewCell.m
//  HenanOA
//
//  Created by 党阳阳 on 14-5-21.
//  Copyright (c) 2014年 broadwave.com. All rights reserved.
//

#import "NewsScrollViewCell.h"



@interface NewsScrollViewCell()
@property (nonatomic,strong) UIImageView *imageView;
@property (nonatomic,strong) UILabel *lable;

@end

@implementation NewsScrollViewCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        
        
       
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame imageString:(NSString *)imageString titleString:(NSString *)titleString
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        if (imageString) {
            
           // [_imageView setImageWithURL:[NSURL URLWithString:imageString]
            //                                placeholderImage:[UIImage imageNamed:@"base_detail_default_pic.png"]];
            _lable = [[UILabel alloc]initWithFrame:CGRectMake(0, self.frame.size.height-20, 320, 20)];
            _lable.textColor = [UIColor whiteColor];
            _lable.font = [UIFont systemFontOfSize:15];
                      
        }else{
            
            _lable = [[UILabel alloc] initWithFrame:frame];
        
        
        }
        
        _lable.backgroundColor = [UIColor colorWithRed:200.0/255 green:200.0/255 blue:200.0/255 alpha:0.8];
        _lable.text = titleString;
        _lable.textColor = [UIColor whiteColor];
        [self addSubview:_imageView];
        [self addSubview:_lable];
    }
    
    return self;
}

#pragma -mark private method


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
